package com.qn.entity;

import lombok.Data;

import java.util.List;

/**
 * @author OLO
 */
@Data
public class MailSendStatus {
    /**
     * 邮件发送成功数量
     */
    private Integer mailSucceed;
    /**
     * 邮件发送失败数量
     */
    private Integer mailFail;
    /**
     * 失败邮箱集合
     */
    private List<String> failList;
    /**
     * 成功邮箱集合
     */
    private List<String> successList;
    /**
     * 是否发送完了所有的待发送集合
     */
    private Boolean flag;
    /**
     * 邮件发送的总数
     */
    private Integer count;

    public void setFailList(String failEmail) {
        this.failList.add(failEmail);
    }

    public void setSuccessList(String successEmail) {
        this.successList.add(successEmail);
    }

    public MailSendStatus(Integer mailSucceed, Integer mailFail, List<String> failList, List<String> successList, Boolean flag, Integer count) {
        this.mailSucceed = mailSucceed;
        this.mailFail = mailFail;
        this.failList = failList;
        this.successList = successList;
        this.flag = flag;
        this.count = count;
    }
}
